package com.kevin.eurekaconsumer.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author kevin
 */
@RestController
public class ZoneController {

    @Autowired
    private RestTemplate restTemplate;

    @GetMapping("/zone")
    public String zone() {

        return restTemplate.getForObject("http://MY-SERVICE-PROVIDER/dc", String.class);
    }
}
